using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using PetShop.Domain.Services;
using PetShop.Domain.Model;
using PetShop.Infrastructure.NHibernate;



namespace PetShop.Application.Facade
{
	public class CatalogFC
	{

		public Category GetCategoryByID(string categoryID)
		{
			if (string.IsNullOrEmpty(categoryID))
				return null;
			var svc = new CategoryServices();
			return svc.GetCategoryByID(categoryID);
		}
	

		public IList GetProductsByCategory(string category)
		{

			if (string.IsNullOrEmpty(category))
				return null;

			var svc = new ProductServices();
				IList boGetProductsByCategory = svc.GetProductsByCategory(category);
				return boGetProductsByCategory;
		}
		
		public IList GetProductsBySearch(string text)
		{


			if (string.IsNullOrEmpty(text))
				return null;

		   
			var svc = new ProductServices();
		    return svc.GetProductsBySearch(text);
	   

		}



		public IEnumerable<ItemEntity> GetItemsByProduct(string productId)
		{
			var svc = new ItemServices();
		    return svc.GetItemsByProduct(productId);
		}

		public ItemEntity GetItemInfoByID(string itemId)
		{
			var svc = new ItemServices();
		    return svc.GetItemInfoByID(itemId);
		}

	

	}
}
